Now we are in the second exercise session. Non-flat files were promised, so please load the GESIS Panel COVID-19 data.
This first part of the exercises only deals with importing data. Later, in the second exercise, we will turn more to non-flat data files and label them before exporting.
haven package.
In contrast to the flat files, such as CSV, the variables now have labels. I wonder how the labels are for the first ten variables…
sjlabelled::get_label(your_data), but you have to make sure only to print the first ten variables.
Unfortunately, it’s all in German. Imagine you are an education researcher, and you are interested in the variable education_cat. So you may want to consider translating the variable into English, right?
age_cat from “Bildung, kategorisiert” into “Education, categorized”.
sjlabelled::set_label() or do it in a pipe with sjlabelled::var_labels().
Your colleague asks you to provide your new data after changing labels and stuff. Unfortunately, she does not use R or SPSS and asks you to export your data as a Stata file.
haven package.